<template>
	<!-- 分类管理 -->
	<section class="type-manage">
		<CommonTable :table-config="typeManageClass.getTableConfig()">
			<template #header>
				<CommonSearch :form-data="typeManageClass.getSearchCol()" @search="val => typeManageClass.serach(val)" />
			</template>
			<template #search>
				<el-button type="primary" :icon="Plus" @click="typeManageClass.add()">新增</el-button>
			</template>
		</CommonTable>
		<CommonDialog width="400" title="新增" v-model="typeManageClass.visible.value" :option-btns="typeManageClass.btns()">
			<template #default>
				<CommonForm ref="commonForm" :form-data="typeManageClass.getFormCol()" />
			</template>
		</CommonDialog>
	</section>
</template>
<script lang="ts" setup>
import { Plus } from '@element-plus/icons-vue'
import { TypeManageClass } from './controller'
import { ref } from 'vue'
const commonForm = ref()
let typeManageClass = new TypeManageClass(commonForm)
</script>
